package com.ruoyi.eduManage.mapper;

import com.ruoyi.eduManage.domain.EduStudentPointsLog;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 学生积分变更记录Mapper接口
 */
public interface EduStudentPointsLogMapper {
    /** 新增积分变更记录 */
    int insertEduStudentPointsLog(EduStudentPointsLog log);

    /** 按学生ID查询记录列表 */
    List<EduStudentPointsLog> selectEduStudentPointsLogListByStudentId(Long studentId);

    /**
     * 查询某学生在日期范围内每日积分汇总
     * 返回Map列表：{date: yyyy-MM-dd, points: 累计变更值}
     */
    List<Map<String,Object>> selectDailyPointsByStudent(
            @Param("studentId") Long studentId,
            @Param("startDate") String startDate,
            @Param("endDate") String endDate);
}